package com.ctshk.sapp.goods.controller;

import com.ctshk.common.dto.Result;
import com.ctshk.common.web.support.BaseController;
import com.ctshk.rpc.goods.service.IESClassificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *     更新ES上的分类缓存
 * </p>
 */
@RestController
@Api(value = "分类缓存 - 控制器", tags = "分类缓存 - 控制器")
@RequestMapping("/es/classification")
public class ESCommodityClassificationController extends BaseController {
    @DubboReference
    IESClassificationService iesClassificationService;

    @GetMapping("/updateClassificationES")
    @ApiOperation(value = "更新分类缓存", notes = "更新分类缓存")
    public Result<Boolean> updateClassificationES(){
        return Result.success(iesClassificationService.updateClassificationES());
    }
}
